package etl.test;

public class StaticLocalObj {
	
	private static int nums = 0;
	
	private static final String ETL_WAY = "QL";
	
	//test singleton pattern
	private static StaticLocalObj staticLocalObj;
	
	public static StaticLocalObj getStaticLocalObj() {
		if (null != staticLocalObj) {
			return staticLocalObj;
		} else {
			staticLocalObj  = new StaticLocalObj();
			return staticLocalObj;
		}
	}
	
	public static void print() {
		System.out.println(ETL_WAY);
	}
	
	public void print1() {
		System.out.println(ETL_WAY);
	}
	/**
	 * @param args
	 */
	public static void main(String[] args) {
		StaticLocalObj.print();
		StaticLocalObj.getStaticLocalObj().print1();
/*		for(int i=0; i<10; i++) {
			System.out.println(new StaticLocalObj().count_calls());
		}*/

	}

	static int count_calls() {
		return ++nums;
	}
}
